1 Public Class FrmSUPPLIER_PRODUCT_PRINT
2
3     Private Sub cmdcancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdcancel.Click
4         Me.Close()
5     End Sub
6
7     Private Sub cmdprint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdprint.Click
8         Dim Report As New FrmREPORTS
9         
'Rpt_SqlStr = "SELECT Suppname, Item_Name FROM ((TBL_Suppliers " & _
10         
' "INNER JOIN TBL_Suppliers_Product ON TBL_Suppliers.Supp_ID = TBL_Suppliers_Product.Supp_ID) " & _
11         
' "INNER JOIN TBL_Category_Item_File ON TBL_Suppliers_Product.Item_ID = TBL_Category_Item_File.Item_ID) " & _
12         
' "WHERE TBL_Suppliers.Supp_ID =" & FrmSUPPLIERSPRODUCT.lstSuppliers.FocusedItem.Text
13         
'Rpt_SqlStr = "select * from tbl_suppliers "
14         
'MsgBox(Rpt_SqlStr)
15
16         
'SELECT 'TBL_Suppliers'.'SuppName', 'TBL_Category_Item_File'.'Item_Name'
17         
'FROM ('TBL_Suppliers' 'TBL_Suppliers' INNER JOIN 'TBL_Suppliers_Product' 'TBL_Suppliers_Product' ON 'TBL_Suppliers'.'Supp_ID'='TBL_Suppliers_Product'.'Supp_ID') INNER JOIN 'TBL_Category_Item_File' 'TBL_Category_Item_File' ON 'TBL_Suppliers_Product'.'Item_ID'='TBL_Category_Item_File'.'Item_ID'
18
19         If rbtAll.Checked Then
20             Rpt_SqlStr =
"SELECT * FROM TBL_Suppliers ORDER BY SuppName "
21         Else
22             FrmSUPPLIERSPRODUCT.lstSuppliers.Focus()
23             FrmSUPPLIERSPRODUCT.lstSuppliers.Select()
24             Rpt_SqlStr =
"SELECT * FROM TBL_Suppliers WHERE Supp_ID =" & FrmSuppliersList.lstSuppliers.FocusedItem.Text & " Order by SuppName"
25         End If
26         Audit_Trail(xUser_ID, TimeOfDay,
"Print Report - Suppliers Products ")
27         
'FrmREPORTS.Show()
28         Report.Show()
29         Me.Close()
30     End Sub
31 End Class


Gõ tìm kiếm nhanh...